/******************************************************************************
Project    : Real time rtsp server library base on live555
*******************************************************************************
File Name    :  <RealTimeRtspServer_common.h>:  real time rtsp server common head file
Module Name  :  
Description  :  None
History      :
 No.   Ver.     Date        Designed by  Comment
-----+--------+----------+------------+---------------------------------------
 001   0.00.01  06/04/2015  <3G@LIURENHUA>   <real time rtsp server common head file>
*******************************************************************************/
#ifndef _REAL_TIME_RTSP_SERVER_COMMON_H
#define _REAL_TIME_RTSP_SERVER_COMMON_H

#include <pthread.h>
#include "queue.h"

/******************************************************************************
  macro define
 ******************************************************************************/
#ifdef LOCAL_SOCK_INPUT
#define LOCAL_SOCKET_ID			"local_udp_socket"
#endif /* LOCAL_SOCK_INPUT */
#define FRAME_PER_SEC			(25)

#define rtsp_db_info(fmt, args...)

/******************************************************************************
  enum declaration
 ******************************************************************************/
/* rtsp server support format */
typedef enum {
	AUDIO_FORMAT_ADTS = 0,
	AUDIO_FORMAT_AMR,
	VIDEO_FORMAT_H264,
	VIDEO_FORMAT_H265,
	VIDEO_FORMAT_MPEG4,
	VIDEO_FORMAT_MP2TS
} tEsFmt;

/* aac using, 
Sampling frequency index */
typedef enum _FS_IDX_et{
	FS_IDX_96 = 0,
	FS_IDX_88,
	FS_IDX_64,
	FS_IDX_48,
	FS_IDX_44,
	FS_IDX_32,
	FS_IDX_24,
	FS_IDX_22,
	FS_IDX_16,
	FS_IDX_12,
	FS_IDX_11,
	FS_IDX_08,
	FS_IDX_07,
	FS_IDX_MAX
}FS_IDX_et;

/* aac using,
Channel configuration */
typedef enum _CH_CFG_et{
	CH_CFG_0 = 0,
	CH_CFG_1,
	CH_CFG_2,
	CH_CFG_3,
	CH_CFG_4,
	CH_CFG_5,
	CH_CFG_6,
	CH_CFG_7,
	CH_CFG_MAX
}CH_CFG_et;

/* aac using,
Profile identity */
typedef enum _PROFILE_et{
	PROFILE_0 = 0,
	PROFILE_1,
	PROFILE_2,
	PROFILE_MAX
}PROFILE_et;

/******************************************************************************
  global variable declaration
 ******************************************************************************/
#ifdef LOCAL_SOCK_INPUT
extern pthread_mutex_t gMutex;
extern int gSMSSCnt;
#endif /* LOCAL_SOCK_INPUT */
#endif /* _REAL_TIME_RTSP_SERVER_COMMON_H */
